Database systems (also known as database management systems) are programs that enable users to store, modify and extract information from a database. A database is an organized collection of data, for example university data, tourism data and medical data. The most common database systems include MySQL, Microsoft SQL Server, Oracle, Sybase and IBM DB2. Typically, the database system is a collection of schemas, tables, queries, reports, views and other objects. For instance, a database of names and addresses might include entries including a resident's name, the name of the street of residence, the house number, the municipality, and a postal code such as the Zip Code in the United States.
Queries are the primary mechanism for retrieving information from the database, and are formulated with questions that are presented to the database in a predefined format. A greater number of database management systems use the Structured Query Language (SQL) standard query format. A query is a request for specific information from a database. For instance, the user may request all data entries in the database which satisfy the request.
Typically, there are three basic methods of querying. The first method involves choosing parameters from a menu. The menu guides a user to choose the parameters (characteristics), making it easy for the user. However, this method is not flexible.
The second method involves Query by Example (QBE) where the user is allowed to specify the fields and values that define the query. For instance, in a database of names and addresses, a database query might be directed to all residents living on a given street, specified in the query by name. If the street is long enough to run through multiple municipalities, the query might additionally specify residents on that street within a specified one of the municipalities.
The third method is a powerful tool that deals with query languages. A majority of database systems require the users to request in the form of a query written in a special query language. This method is complex as it requires the user to learn the specialized query language.
Further, for the user to write a query in a structured query language, the user must be aware of which tables contain the relevant information and the columns within those tables that contain the relevant values. This knowledge is difficult to attain in cases where the user has not designed the tables and neither knows a concerned person to ask. Consequently, the user needs to keep searching until the relevant table is found. This prolonged process of guessing may be unduly time-consuming, and may make the user frustrated.
Epigrammatically, the time required to write the query grows with a number of factors. The factors include the number of tables in the database, the number of columns in the tables and the number of possible alternatives for any given term.
In the light of the above discussion, there appears to be a need for a method and system for an easier way of writing queries.